package com.ytjj.qmyx.admin.service.impl;

import com.github.pagehelper.PageHelper;
import com.ytjj.common.api.CommonPage;
import com.ytjj.qmyx.admin.dao.PresellSubscribeInfoDao;
import com.ytjj.qmyx.admin.model.request.PresellSubscribeInfoRequest;
import com.ytjj.qmyx.admin.model.response.PresellSubscribeInfoResponse;
import com.ytjj.qmyx.admin.service.PresellSubscribeInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * 
 * @description:
 */
@Service
@Slf4j
public class PresellSubscribeInfoServiceImpl implements PresellSubscribeInfoService {

    @Autowired
    PresellSubscribeInfoDao presellSubscribeInfoDao;

    @Override
    public CommonPage<PresellSubscribeInfoResponse> getInfoList(PresellSubscribeInfoRequest psRequest) {
        PageHelper.startPage(psRequest.getPageNum(), psRequest.getPageSize());
        List<PresellSubscribeInfoResponse> presellSubscribeInfoResponses = presellSubscribeInfoDao.selectInfoList(psRequest);
        return CommonPage.restPage(presellSubscribeInfoResponses);
    }
}
